.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.title {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
  font-weight: 600;
}

.message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
  
  &.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  
  &.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  
  @media (max-width: 1024px) {
    grid-template-columns: 1fr;
  }
}

.section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e1e5e9;
  
  h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
  }
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  
  h2 {
    margin: 0;
  }
}

.form {
  .field {
    margin-bottom: 16px;
    
    label {
      display: block;
      margin-bottom: 6px;
      font-weight: 500;
      color: #555;
      font-size: 0.9rem;
    }
    
    input, select, textarea {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 0.9rem;
      transition: border-color 0.2s;
      
      &:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
      }
    }
    
    textarea {
      resize: vertical;
      font-family: inherit;
    }
  }
  
  .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    
    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }
    
    &:has(.field:nth-child(3)) {
      grid-template-columns: 1fr 1fr 1fr;
      
      @media (max-width: 768px) {
        grid-template-columns: 1fr;
      }
    }
  }
}

.submitBtn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  
  &:hover:not(:disabled) {
    background: #0056b3;
  }
  
  &:disabled {
    background: #6c757d;
    cursor: not-allowed;
  }
}

.buttonGroup {
  display: flex;
  gap: 8px;
  align-items: center;
}

.refreshBtn {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
  
  &:hover:not(:disabled) {
    background: #1e7e34;
  }
  
  &:disabled {
    background: #6c757d;
    cursor: not-allowed;
  }
}

.clearBtn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
  
  &:hover:not(:disabled) {
    background: #c82333;
  }
  
  &:disabled {
    background: #6c757d;
    cursor: not-allowed;
  }
}

.empty {
  text-align: center;
  color: #666;
  padding: 40px 20px;
  font-style: italic;
}

.table {
  .tableHeader {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr 140px 80px;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 2px solid #e1e5e9;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    
    @media (max-width: 768px) {
      grid-template-columns: 60px 1fr 80px 60px;
      
      > div:nth-child(4),
      > div:nth-child(5) {
        display: none;
      }
    }
  }
  
  .tableRow {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr 140px 80px;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background-color 0.2s;
    
    &:hover {
      background-color: #f8f9fa;
    }
    
    @media (max-width: 768px) {
      grid-template-columns: 60px 1fr 80px 60px;
      
      .description,
      .time {
        display: none;
      }
    }
  }
  
  .id {
    font-family: monospace;
    font-size: 0.8rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .name {
    font-weight: 500;
    color: #333;
  }
  
  .type {
    .badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 500;
      text-transform: uppercase;
      
      &.txt2img {
        background: #e3f2fd;
        color: #1565c0;
      }
      
      &.img2img {
        background: #f3e5f5;
        color: #7b1fa2;
      }
      
      &.postprocess {
        background: #e8f5e8;
        color: #2e7d32;
      }
    }
  }
  
  .description {
    color: #666;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .time {
    font-size: 0.8rem;
    color: #888;
  }
  
  .actions {
    .deleteBtn {
      background: #dc3545;
      color: white;
      border: none;
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 0.8rem;
      cursor: pointer;
      transition: background-color 0.2s;
      
      &:hover:not(:disabled) {
        background: #c82333;
      }
      
      &:disabled {
        background: #6c757d;
        cursor: not-allowed;
      }
    }
  }
}

// 响应式优化
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .content {
    gap: 20px;
  }
  
  .section {
    padding: 16px;
  }
}